home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cdrtools-1.10 / include / mconfig.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-28  |  6.6 KB  |  330 lines

  1. /* @(#)mconfig.h    1.33 00/05/28 Copyright 1995 J. Schilling */
  2. /*
  3.  *    definitions for machine configuration
  4.  *
  5.  *    Copyright (c) 1995 J. Schilling
  6.  *
  7.  *    This file must be included before any other file.
  8.  *    Use only cpp instructions.
  9.  *
  10.  *    NOTE: SING: (Schily Is Not Gnu)
  11.  */
  12. /*
  13.  * This program is free software; you can redistribute it and/or modify
  14.  * it under the terms of the GNU General Public License as published by
  15.  * the Free Software Foundation; either version 2, or (at your option)
  16.  * any later version.
  17.  *
  18.  * This program is distributed in the hope that it will be useful,
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  * GNU General Public License for more details.
  22.  *
  23.  * You should have received a copy of the GNU General Public License
  24.  * along with this program; see the file COPYING.  If not, write to
  25.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  26.  */
  27.  
  28. #ifndef _MCONFIG_H
  29. #define _MCONFIG_H
  30.  
  31. /*
  32.  * This hack that is needed as long as VMS has no POSIX shell.
  33.  */
  34. #ifdef    VMS
  35. #    define    USE_STATIC_CONF
  36. #endif
  37.  
  38. #ifdef    USE_STATIC_CONF
  39. #include <xmconfig.h>    /* This is the current static autoconf stuff */
  40. #else
  41. #include <xconfig.h>    /* This is the current dynamic autoconf stuff */
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. /*
  49.  * The NetBSD people want to bother us.
  50.  * They removed the definition for 'unix' and are bleating for every test
  51.  * for #if defined(unix). So we need to check for NetBSD early.
  52.  */
  53. #ifndef    IS_UNIX
  54. #    if defined(__NetBSD__)
  55. #        define    IS_UNIX
  56. #    endif
  57. #endif
  58.  
  59. #ifndef    IS_UNIX
  60. #    if defined(unix) || defined(__unix) || defined(__unix__)
  61. #        define    IS_UNIX
  62. #    endif
  63. #endif
  64.  
  65. #ifdef    __MSDOS__
  66. #    define    IS_MSDOS
  67. #endif
  68.  
  69. #if defined(tos) || defined(__tos)
  70. #    define    IS_TOS
  71. #endif
  72.  
  73. #ifdef    THINK_C
  74. #    define    IS_MAC
  75. #endif
  76.  
  77. #if defined(sun) || defined(__sun) || defined(__sun__)
  78. #    define    IS_SUN
  79. #endif
  80.  
  81. #if defined(__CYGWIN32__) || defined(__CYGWIN__)
  82. #       define IS_GCC_WIN32
  83. #endif
  84.  
  85. /*--------------------------------------------------------------------------*/
  86. /*
  87.  * Some magic that cannot (yet) be figured out with autoconf.
  88.  */
  89.  
  90. #if defined(sun3) || defined(mc68000) || defined(mc68020)
  91. #    ifndef    HAVE_SCANSTACK
  92. #    define    HAVE_SCANSTACK
  93. #    endif
  94. #endif
  95. #ifdef sparc
  96. #    ifndef    HAVE_LDSTUB
  97. #    define    HAVE_LDSTUB
  98. #    endif
  99. #    ifndef    HAVE_SCANSTACK
  100. #    define    HAVE_SCANSTACK
  101. #    endif
  102. #endif
  103. #if    defined(__i386_) || defined(i386)
  104. #    ifndef    HAVE_XCHG
  105. #    define    HAVE_XCHG
  106. #    endif
  107. #    ifndef    HAVE_SCANSTACK
  108. #    define    HAVE_SCANSTACK
  109. #    endif
  110. #endif
  111.  
  112. /*
  113.  * Use of SCANSTACK is disabled by default
  114.  */
  115. #ifndef    USE_SCANSTACK
  116. #    undef    HAVE_SCANSTACK
  117. #endif
  118.  
  119. #if    defined(SOL2) || defined(SOL2) || defined(S5R4) || defined(__S5R4) \
  120.                             || defined(SVR4)
  121. #    ifndef    __SVR4
  122. #        define    __SVR4
  123. #    endif
  124. #endif
  125.  
  126. #ifdef    __SVR4
  127. #    ifndef    SVR4
  128. #        define    SVR4
  129. #    endif
  130. #endif
  131.  
  132. /*
  133.  * SunOS 4.x / SunOS 5.x
  134.  */
  135. #if defined(IS_SUN)
  136. #    define    HAVE_GETAV0
  137. #endif
  138.  
  139. /*
  140.  * AIX
  141.  */
  142. #if    defined(_IBMR2) || defined(_AIX)
  143. #    ifndef    IS_UNIX
  144. #    define    IS_UNIX        /* ??? really ??? */
  145. #    endif
  146. #endif
  147.  
  148. /*
  149.  * QNX
  150.  */
  151. #if defined(__QNX__)
  152. #    ifndef    IS_UNIX
  153. #    define    IS_UNIX
  154. #    endif
  155. #endif
  156.  
  157. /*
  158.  * Silicon Graphics    (must be before SVR4)
  159.  */
  160. #if defined(sgi) || defined(__sgi)
  161. #    define    __NOT_SVR4__    /* Not a real SVR4 implementation */
  162. #endif
  163.  
  164. /*
  165.  * Data General
  166.  */
  167. #if defined(__DGUX__)
  168. #ifdef    XXXXXXX
  169. #    undef    HAVE_MTGET_DSREG
  170. #    undef    HAVE_MTGET_RESID
  171. #    undef    HAVE_MTGET_FILENO
  172. #    undef    HAVE_MTGET_BLKNO
  173. #endif
  174. #    define    mt_type        mt_model
  175. #    define    mt_dsreg    mt_status1
  176. #    define    mt_erreg    mt_status2
  177.     /*
  178.      * DGUX hides its flock as dg_flock.
  179.      */
  180. #    define    HAVE_FLOCK
  181. #    define    flock    dg_flock
  182.     /*
  183.      * Use the BSD style wait on DGUX to get the resource usages of child
  184.      * processes.
  185.      */
  186. #    define    _BSD_WAIT_FLAVOR
  187. #endif
  188.  
  189. /*
  190.  * Apple Rhapsody (This is the name for Mac OS X beta)
  191.  */
  192. #if defined(__NeXT__) && defined(__TARGET_OSNAME) && __TARGET_OSNAME == rhapsody
  193. #    define HAVE_OSDEF /* prevent later definitions to overwrite current */
  194. #    ifndef    IS_UNIX
  195. #    define    IS_UNIX
  196. #    endif
  197. #endif
  198.  
  199. /*
  200.  * NextStep
  201.  */
  202. #if defined(__NeXT__) && !defined(HAVE_OSDEF)
  203. #define    NO_PRINT_OVR
  204. #undef    HAVE_USG_STDIO        /*
  205.                  *  NeXT Step 3.x uses __flsbuf(unsigned char , FILE *)
  206.                  * instead of __flsbuf(int, FILE *)
  207.                  */
  208. #    ifndef    IS_UNIX
  209. #    define    IS_UNIX
  210. #    endif
  211. #endif
  212.  
  213. /*
  214.  * Mac OS X
  215.  */
  216. #if defined(__APPLE__) && defined(__MACH__)
  217. #    ifndef    IS_UNIX
  218. #    define    IS_UNIX
  219. #    endif
  220. #    define    IS_MACOS_X
  221. #endif
  222.  
  223. /*
  224.  * NextStep 3.x has a broken linker that does not allow us to override
  225.  * these functions.
  226.  */
  227. #ifndef    __OPRINTF__
  228.  
  229. #ifdef    NO_PRINT_OVR
  230. #    define    printf    Xprintf
  231. #    define    fprintf    Xfprintf
  232. #    define    sprintf    Xsprintf
  233. #endif
  234.  
  235. #endif    /* __OPRINTF__ */
  236.  
  237. /*--------------------------------------------------------------------------*/
  238. /*
  239.  * If there is no flock defined by the system, use emulation
  240.  * through fcntl record locking.
  241.  */
  242. #ifndef HAVE_FLOCK
  243. #define LOCK_SH         1       /* shared lock */
  244. #define LOCK_EX         2       /* exclusive lock */
  245. #define LOCK_NB         4       /* don't block when locking */
  246. #define LOCK_UN         8       /* unlock */
  247. #endif
  248.  
  249. #include <prototyp.h>
  250.  
  251. /*
  252.  * gcc 2.x generally implements the long long type.
  253.  */
  254. #ifdef    __GNUC__
  255. #    if    __GNUC__ > 1
  256. #        ifndef    HAVE_LONGLONG
  257. #            define    HAVE_LONGLONG
  258. #        endif
  259. #    endif
  260. #endif
  261.  
  262. #ifdef    __CHAR_UNSIGNED__    /* GNU GCC define     (dynamic)    */
  263. #ifndef CHAR_IS_UNSIGNED
  264. #define    CHAR_IS_UNSIGNED    /* Sing Schily define (static)    */
  265. #endif
  266. #endif
  267.  
  268. /*
  269.  * Convert to GNU name
  270.  */
  271. #ifdef    HAVE_STDC_HEADERS
  272. #    ifndef    STDC_HEADERS
  273. #        define    STDC_HEADERS
  274. #    endif
  275. #endif
  276. /*
  277.  * Convert to SCHILY name
  278.  */
  279. #ifdef    STDC_HEADERS
  280. #    ifndef    HAVE_STDC_HEADERS
  281. #        define    HAVE_STDC_HEADERS
  282. #    endif
  283. #endif
  284.  
  285. #ifdef    IS_UNIX
  286. #    define    PATH_DELIM    '/'
  287. #    define    PATH_DELIM_STR    "/"
  288. #    define    far
  289. #    define    near
  290. #endif
  291.  
  292. #ifdef    IS_GCC_WIN32
  293. #    define    PATH_DELIM    '/'
  294. #    define    PATH_DELIM_STR    "/"
  295. #    define    far
  296. #    define    near
  297. #endif
  298.  
  299. #ifdef    __EMX__                /* We don't want to call it UNIX */
  300. #    define    PATH_DELIM    '/'
  301. #    define    PATH_DELIM_STR    "/"
  302. #    define    far
  303. #    define    near
  304. #endif
  305.  
  306. #ifdef    IS_MSDOS
  307. #    define    PATH_DELIM    '\\'
  308. #    define    PATH_DELIM_STR    "\\"
  309. #endif
  310.  
  311. #ifdef    IS_TOS
  312. #    define    PATH_DELIM    '\\'
  313. #    define    PATH_DELIM_STR    "\\"
  314. #    define    far
  315. #    define    near
  316. #endif
  317.  
  318. #ifdef    IS_MAC
  319. #    define    PATH_DELIM    ':'
  320. #    define    PATH_DELIM_STR    ":"
  321. #    define    far
  322. #    define    near
  323. #endif
  324.  
  325. #ifdef __cplusplus
  326. }
  327. #endif
  328.  
  329. #endif /* _MCONFIG_H */
  330.